<template>
  <div>
    <el-row  :gutter="30">
      <!-- {{data}} -->
      <!-- <div v-html="data"></div> -->
      <el-col :span="5">
        <el-menu
          default-active="/personal"
          class="el-menu-vertical-demo menu"
          :default-openeds="activeIn"
          text-color="#0b2c89"
          active-text-color="#fff"
          router
          @close="preventCol"
        >
          <el-submenu index="a">
            <template slot="title">
              <span>借贷项目</span>
            </template>
            <el-menu-item index="1-1">投标明细</el-menu-item>
            <el-menu-item index="1-2">收款明细</el-menu-item>
            <el-menu-item index="1-3">借款明细</el-menu-item>
            <el-menu-item index="1-4">还款明细</el-menu-item>
          </el-submenu>
          <el-submenu index="b">
            <template slot="title">
              <span>我的账户</span>
            </template>
            <el-menu-item index="/personal">账户信息</el-menu-item>
            <el-menu-item index="2-2">实名认证</el-menu-item>
            <el-menu-item index="2-3">风控资料认证</el-menu-item>
            <el-menu-item index="2-4">银行卡管理</el-menu-item>
            <el-menu-item index="/ipLog">登录记录</el-menu-item>
            <el-menu-item index="/userInfo">个人资料</el-menu-item>
          </el-submenu>
          <el-submenu index="b">
            <template slot="title">
              <span>资产详情</span>
            </template>
            <el-menu-item index="3-1">账户流水</el-menu-item>
            <el-menu-item index="3-2">充值明细</el-menu-item>
            <el-menu-item index="3-3">提现申请</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-col>
      <el-col :span="19">
        <router-view></router-view>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIn: ["a", "b"]
    };
  },
  props: ["username"],
  methods: {
    async getLoginInfo() {
      // const res=await this.$http.get('/personal.do') //,{param:this.usernme}
      // const res=await this.$http.post('/sendVerifyCode.do',this.$qs.stringify({phoneNumber:'18048635956'}))
      // this.data=res.data
      // console.log(res)
      // console.log(this.data)
    },
    //禁止点击一级菜单时关闭该菜单
    preventCol() {
      this.activeIn = ["a", "b"];
    }
  },
  created() {
    this.getLoginInfo();
  }
};
</script>

<style lang="less" scoped>
.menu {
  border: 1px solid #ddd;
  border-radius: 5px;
}
</style>